<template>
  <div>
    <MyEditor :options="options" ref="editor" />
  </div>
</template>
<script>
import axios from "@/util/axios";

import MyEditor from "@/components/question/Editor/MyEditor";
export default {
  name: "askEditor",
  data() {
    return {
      options: {
        placeholder: "输入问题背景、条件等详细信息（选填）",
      },
    };
  },
  methods: {
    post(title) {
      let content = this.$refs.editor.content;
      axios
        .post("question/askQuestion", {
          data: {
            title: title,
            detail: content,
          },
        })
        .then((res) => {
          console.log(res);

          if (res.code === "1") {
            //提问成功
            this.$Message.success("成功发布提问");
            // this.$router.push
          } else {
            console.log("abaaba");
          }
        });
    },
  },
  components: {
    MyEditor,
  },
};
</script>

<style scoped>
#app {
  width: 100%;
  height: 100%;
}
</style>
